﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;

namespace LastfmNet.Models
{
    public class TrackArtist : LastfmModelBase, IArtist
    {
        public TrackArtist()
        {
            this.Name = string.Empty;
            this.Mbid = string.Empty;
            this.Url = string.Empty;
        }

        public TrackArtist(XmlNode trackArtistNode)
        : this()
        {
            if (trackArtistNode == null) return;
            else this.InitializeFromXmlNode(trackArtistNode);
        }

        public override void InitializeFromXmlNode(XmlNode node)
        {
            if (node == null) return;
            this.Name = node.GetChildValue("name");
            this.Mbid = node.GetChildValue("mbid");
            this.Url = node.GetChildValue("url");
        }

        public string Name { get; set; }

        public string Mbid { get; set; }

        public string Url { get; set; }
    }
}
